package com.macaque.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.macaque.base.entity.Entity;
import com.macaque.example.dao.UserMapper;
import com.macaque.example.model.User;

@Service
public class UserService {
	@Autowired
	private UserMapper userMapper;

	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	public List<User> getList() {

		return userMapper.getList();
	}
	
	public User getUserById(String id) {

		return userMapper.getById(id);
	}

	public void deleteById(String id) {
		userMapper.deleteById(id);
	}

	public void save(User user) {
		userMapper.save(user);
	}
	
}
